/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class SucursalDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression idSucursal;
	public final StringExpression nombreSucursal;
	public final StringExpression direccionComercial;
	public final StringExpression fono;
	public final IntegerExpression coordenada1;
	public final IntegerExpression coordenada2;
	
	public SucursalDetachedCriteria() {
		super(orm.Sucursal.class, orm.SucursalCriteria.class);
		idSucursal = new IntegerExpression("idSucursal", this.getDetachedCriteria());
		nombreSucursal = new StringExpression("nombreSucursal", this.getDetachedCriteria());
		direccionComercial = new StringExpression("direccionComercial", this.getDetachedCriteria());
		fono = new StringExpression("fono", this.getDetachedCriteria());
		coordenada1 = new IntegerExpression("coordenada1", this.getDetachedCriteria());
		coordenada2 = new IntegerExpression("coordenada2", this.getDetachedCriteria());
	}
	
	public SucursalDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.SucursalCriteria.class);
		idSucursal = new IntegerExpression("idSucursal", this.getDetachedCriteria());
		nombreSucursal = new StringExpression("nombreSucursal", this.getDetachedCriteria());
		direccionComercial = new StringExpression("direccionComercial", this.getDetachedCriteria());
		fono = new StringExpression("fono", this.getDetachedCriteria());
		coordenada1 = new IntegerExpression("coordenada1", this.getDetachedCriteria());
		coordenada2 = new IntegerExpression("coordenada2", this.getDetachedCriteria());
	}
	
	public TiendaDetachedCriteria createTiendaidTiendaCriteria() {
		return new TiendaDetachedCriteria(createCriteria("tiendaidTienda"));
	}
	
	public ProductoDetachedCriteria createProductoCriteria() {
		return new ProductoDetachedCriteria(createCriteria("ORM_Producto"));
	}
	
	public Sucursal uniqueSucursal(PersistentSession session) {
		return (Sucursal) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Sucursal[] listSucursal(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Sucursal[]) list.toArray(new Sucursal[list.size()]);
	}
}

